<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"><!---->
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<link th:href="@{/plugin/layui/css/layui.css}" rel="stylesheet"/>
<script type="text/javascript" th:src="@{/plugin/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/js/common.js}"></script>
<body>
<table class="layui-hide" id="test" lay-filter="table"></table>
</body>
<script>
    layui.use(['form', 'layer', 'table'], function () {
        var table = layui.table
            , form = layui.form, $ = layui.$;

        table.render({
            elem: '#test'  //绑定table id
            , url: 'pj/getAllEva'  //数据请求路径
            , cellMinWidth: 80
            , cols: [
                [
                    {type: 'numbers'}
                    , {field: 'courseName', title: '课程名称'}
                    , {field: 'teacherName', title: '教师'}
                    , {field: 'zongfen', title: '平均分'}
                    , {field: 'shijian', title: '课程时间'}
                    , {fixed: 'right', title: '操作', width: 180, align: 'center', toolbar: '#toolBar'}//一个工具栏  具体请查看layui官网
                ]
            ]
            , page: true   //开启分页
            , limit: 10   //默认十条数据一页
            , limits: [10, 20, 30, 50]  //数据分页条
            , id: 'testReload'
        });
    });
</script>
</html>